<!-- 扫码看模  模型信息页面 -->
<template>
  <div class='container-model-message'>
    <van-nav-bar
      title="模型"
      left-arrow
      @click-left="onClickLeft"
    />
    <!-- <div class="model">
      <model :BuildingID="BuildingID"></model>
    </div> -->
    <iframe v-if="url" class="model" :src="url">
    </iframe>
    <div v-else class="model">
      <img src="../../../assets/imgs/AI_report_no.png"/>
      <p>找不到模型</p>
    </div>
  </div>
</template>

<script type='textecmascript-6'>
import model from '@/components/model/model.vue'
export default {
 data() {
   return {
 data: 'data'
   }
 },
 computed:{
   url(){
     let url = this.$route.query.url
     if(url.indexOf('watchModel') > -1){
      return this.$route.query.url
     }else {
       return ''
     }
     
   }
 },
 components:{
   model
 },
 methods:{
   onClickLeft(){
     this.$router.go(-1)
   }
 }
}

</script>
<style lang='stylus' scoped rel='stylesheet/stylus'>
.container-model-message
  width 100%
  height 100%
  overflow: hidden;
  position relative
  .model
    width 100%
    height  calc(100% - 80px)
    p 
      text-align center
      font-size 28px
      margin-top 56px
    img
      width 50%
      margin-left 25%
      margin-top 10%
</style>
<style>
.container-model-message .van-nav-bar{
  height: 80px;
}
.container-model-message .van-nav-bar__title{
  font-size: 32px;
  line-height: 80px;
}
.container-model-message .van-nav-bar__arrow{
  font-size: 56px;
  position: absolute;
  top: -76px;
}
/* .container-model-message .van-nav-bar__left{
  bottom: 10px
} */
</style>
